package org.china.lanzhou.atom;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class DefaultAtomManager implements AtomManager{

    private transient List<LinkAtom> linkAtomCollection ;


    public DefaultAtomManager() {
        this.linkAtomCollection = new ArrayList<>();
    }

    @Override
    public void put(int atom) {
        LinkAtom linkAtom = new LinkAtom();
        linkAtom.setAtom(new SimpleAtom(atom));
        put(linkAtom);
    }
    @Override
    public void put(int atom, int describe, int target) {
        LinkAtom linkAtom = new LinkAtom();
        linkAtom.setAtom(new SimpleAtom(atom));
        linkAtom.setTarget(new SimpleAtom(target));
        put(linkAtom);
    }

    @Override
    public void put(LinkAtom linkAtom) {
        linkAtomCollection.add(linkAtom);
    }

    @Override
    public List<LinkAtom> getLinks() {
        return linkAtomCollection;
    }

    /**
     * 验证完整性
     */
    @Override
    public boolean verify() {
        return false;
    }
}
